#!/sbin/openrc-run

description="Metric exporter for bird routing daemon"
name=bird_exporter
command=/usr/bin/bird_exporter
command_user=bird_exporter:bird
command_background=yes
pidfile=/run/bird_exporter/bird_exporter.pid
command_args="-bird.v2 -format.description-labels -format.new"

depend() {
	need bird
	use logger
	after firewall
}

start_pre() {
	checkpath --directory --mode 0775 $(dirname $pidfile)
}
